class TestChoose {
    public static void main(String args[]) {
        int n = 2;
        while (n <= 10) {
            boolean flag = true;
            int k1 = 2;
            while (k1 <= n / 2 + 1) {
                if (n % k1 == 0) {
                    flag = false;
                    break;
                }
                k1++;
            }
            if (flag) {
                System.out.println(n + " ");
            }
            n++;
        }
    }
}